//8160
//8152
//8152-7168=
//984
//------------------------------------------------------------------------------
typedef struct connection
{
	int new_sid;
	struct sockaddr_in client_addr;
}connection;
//------------------------------------------------------------------------------
//8152
typedef struct msg_t
{	
	int  node_id;
	int  microseconds;
	int  msg_id;
	char fake[8492];
}msg;
//------------------------------------------------------------------------------

#define MAX_MSG_COUNT 1// ((MAX_PACKET_SIZE) - (6*sizeof(int))-(4*sizeof(bool)))/( sizeof(msg))

typedef struct pack_t
{
	int pack_id;
	msg msgs[MAX_MSG_COUNT];
}pack;

//------------------------------------------------------------------------------
typedef struct inst_t
{	
	pack packet;
	bool deliver;
	bool received;
	
	int instance_id;
	int coordinator_id;
	int dec;
    int round_number;
	int highestDeliverable;
	
}inst;
//------------------------------------------------------------------------------
typedef struct result_t{
	
	int total_time;
	int HD;
	int delivered;
	double avg_throughput;
	int interval_time;
	int interval_delivery;
	double interval_throughput;
	int totalHole;
	int intervalHole;
	int totalRedundant;
	int intervalRedundant;
	double avg_m_latency;
	int lost;

}result;
//------------------------------------------------------------------------------
typedef struct lost_t
{	
	int msecTotal;
	int msecInterval;
	int ids[100000];
	int count;
	
}lost;
//------------------------------------------------------------------------------
typedef struct gap_t{
	int start;
	int end;
}gap;
//------------------------------------------------------------------------------
